import os
import shutil

if __name__ == '__main__':
    dir_ = "./casia"
    des_dir="./audio"
    for dir in os.listdir(dir_):
        for emotion in os.listdir(os.path.join(dir_,dir)):
            for audio in os.listdir(os.path.join(os.path.join(dir_,dir),emotion)):
                file_name, file_extend = os.path.splitext(audio)
                source=os.path.join(os.path.join(os.path.join(dir_,dir),emotion),audio)
                print(source)
                destination=os.path.join(des_dir,dir+"_"+emotion+"_"+audio)
                print(destination)
                shutil.copy(source,destination)